package com.lanou.service.impl;

import com.lanou.bean.CpnUseRecord;
import com.lanou.mapper.CpnRecordMapper;
import com.lanou.mapper.CpnUseRecordMapper;
import com.lanou.service.CpnUseRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CpnUseRecordServiceImpl implements CpnUseRecordService{

    @Autowired
    private CpnUseRecordMapper cpnUseRecordMapper;


    @Override
    public List<CpnUseRecord> selectCpnUseRecordbyVipNo(String vipNo) {
        return cpnUseRecordMapper.selectCpnUseRecordbyVipNo(vipNo);
    }

    @Override
    public int insertSelective(CpnUseRecord record) {
        return cpnUseRecordMapper.insertSelective(record);
    }

    @Override
    public int selectMaxidInCpnUseRecord() {
        return cpnUseRecordMapper.selectMaxidInCpnUseRecord();
    }

    @Override
    public List<CpnUseRecord> selectAllCpnUseRecordByVipNo(String vipNo) {
        return cpnUseRecordMapper.selectAllCpnUseRecordByVipNo(vipNo);
    }

    @Override
    public int updateCpnUseRecordByCpnNoVipNo(CpnUseRecord cpnUseRecord) {
        return cpnUseRecordMapper.updateCpnUseRecordByCpnNoVipNo(cpnUseRecord);
    }

    @Override
    public String selectMaxOrderNo() {
        return cpnUseRecordMapper.selectMaxOrderNo();
    }
}
